package org.lq.shopping.service.impl;

import java.sql.Date;
import java.util.List;

import org.lq.shopping.dao.InvoiceDao;
import org.lq.shopping.dao.impl.InvoiceDaoImpl;
import org.lq.shopping.entity.ShopInvoice;
import org.lq.shopping.service.InvoiceService;

public class InvoiceServiceImpl implements InvoiceService {

	InvoiceDao idao=new InvoiceDaoImpl();
	@Override
	public List<ShopInvoice> findByInvoiceType(String invoicetype) {
		return idao.findByInvoiceType(invoicetype);
	}

	@Override
	public boolean add(ShopInvoice i) {
		return idao.add(i)>0;
	}

	@Override
	public List<ShopInvoice> findPage(int pageIndex, int pageSize) {
		return idao.findPage(pageIndex, pageSize);
	}

	@Override
	public List<ShopInvoice> findPageById(int uid, int pageIndex, int pageSize) {
		
		return idao.findPageById(uid, pageIndex, pageSize);
	}

	@Override
	public List<ShopInvoice> findPageLikeName(String uname, int pageIndex, int pageSize) {
		return idao.findPageLikeName(uname, pageIndex, pageSize);
	}

	@Override
	public List<ShopInvoice> findPageByTime(Date startTime, Date endTime, int pageIndex, int pageSize) {
		return idao.findPageByTime(startTime, endTime, pageIndex, pageSize);
	}

}
